<?php

namespace App\Admin\Repositories\Virtual;

use App\Models\Virtual\Virtual as Model;
use Dcat\Admin\Repositories\EloquentRepository;
use App\Models\Category\Category;

class Virtual extends EloquentRepository
{
    /**
     * Model.
     *
     * @var string
     */
    protected $eloquentClass = Model::class;

    public static function categoryList(): array
    {
        return Category::query()->where('parent_id', 0)->has('virtual')->get()->pluck('name', 'id')->toArray();
    }
}
